<?php

if (!isset($_COOKIE['username'])) {
	die();
}
?>

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf8">

	<link rel="stylesheet" href="style.css">
	
	<script src="jQuery.js"></script>
</head>
<body>
	<div id="wrapper">

		<form action="" id="form" name="form">
			<input type="text" placeholder="text" name='text'>
			<input type="text" placeholder="img" name='img'>
			<input type="text" placeholder="category" name='category'>
			<input type="submit" id='submit'>
		</form>
	</div>

	<script>
		$("#submit").click(function (e) {
			$.post("save.php",$("#form").serialize());
			return false;
		})
	</script>
</body>
</html>